import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueAxios from 'vue-axios';
import axios from 'axios';
import Moment from 'moment'; //时间格式化

Vue.config.productionTip = false

//设置api请求的基地址
axios.defaults.baseURL = 'https://localhost:5001/'

Vue.use(ElementUI);  //使用eleme插件
Vue.use(VueAxios,axios)

//定义全局过滤器
Vue.filter('formatDateTime', function (value) {
  if (!value) return ''
  return Moment(value).format('YYYY-MM-DD HH:mm:ss')
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
